const settings = require('./src/settings.js')

module.exports = {
  devServer: {
    proxy:{
      '/request':{
        target:"http://x.hfbdqn.cn:30006/",
        ws: true,
        changeOrigin: true,
        pathRewrite:{
          '^/request':""
        }
      }
    }
  },
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
        args[0].title= settings.title || '默认标题'
        return args
      })
  }
}
